In recent years, the depth of field of an endoscope system has become shallow along with the use of an image sensor having a large number of pixels. In view of this, an endoscope system that performs an autofocus (AF) process has been proposed.
An endoscopic procedure involves ablating a lesioned part, suturing, and the like. Thus, a treatment tool such as an electrocauter and forceps might be disposed between a tissue that is a focusing target and an endoscope system serving as an imaging device. In such a case, a treatment tool that has a higher contrast than a tissue might be brought into focus, and thus the tissue might fail to be brought into focus.
JP-A-2006-245792 discloses a technique to address this. Specifically, in a case where there is an obstacle between the target subject and an imaging device, the target subject is brought into focus with the obstacle designated by a user.